-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DOP-15564] Avoid urlencoding JDBC params #268
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dolfinus
force-pushed
the
feature/DOP-15564
branch
from
April 26, 2024 14:42
6af2bce
to
fc0c638
Compare
dolfinus
force-pushed
the
feature/DOP-15564
branch
from
April 26, 2024 14:48
fc0c638
to
ba72870
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #268 +/- ##
===========================================
- Coverage 94.45% 94.44% -0.02%
===========================================
Files 204 204
Lines 7978 7999 +21
Branches 1403 1404 +1
===========================================
+ Hits 7536 7555 +19
- Misses 319 320 +1
- Partials 123 124 +1 ☔ View full report in Codecov by Sentry. |
dolfinus
force-pushed
the
feature/DOP-15564
branch
from
April 26, 2024 15:14
ba72870
to
3233b36
Compare
dolfinus
force-pushed
the
feature/DOP-15564
branch
from
April 26, 2024 15:41
3233b36
to
95e6069
Compare
tests/tests_integration/tests_db_connection_integration/test_mssql_integration.py
Outdated
Show resolved
Hide resolved
tests/tests_integration/tests_db_connection_integration/test_mysql_integration.py
Outdated
Show resolved
Hide resolved
tests/tests_integration/tests_db_connection_integration/test_oracle_integration.py
Outdated
Show resolved
Hide resolved
dolfinus
force-pushed
the
feature/DOP-15564
branch
from
May 2, 2024 09:09
95e6069
to
f7f352f
Compare
dolfinus
force-pushed
the
feature/DOP-15564
branch
from
May 2, 2024 09:10
f7f352f
to
4a42cd5
Compare
maxim-lixakov
approved these changes
May 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Summary
Instead of passing
JDBC(extra={"option1": "value1", "option2": "value2"})
values as query part of JDBC URLprocotol://host:port/database?option1=value1&option2=value2
, usejava.util.Properties
map to pass these options directly to a driver. This avoids unnecessary urlencode+urldecode.To check that properties are really passed to a driver, added integration tests with passing some value with wrong type (e.g. string where integer was expected, and so on), and checking that connection cannot be established.
The only database left intact is Teradata because there is no Teradata docker image to run integration tests with, and also it is specifically mentioned in documentation that most of parameters are read from the URL only.
Also replaced
spark.read.jdbc(...)
anddf.write.jdbc(...)
withspark.read.format("jdbc").options(...).load()
anddf.write.format("jdbc").options(...).save()
. Arguments of prior functions have different names (e.g.partition_column
vs.column
), but options have the same name for both.Related issue number
Checklist
docs/changelog/next_release/<pull request or issue id>.<change type>.rst
file added describing change(see CONTRIBUTING.rst for details.)